#pragma once



typedef struct _CommPackage {
	ULONG64 id;
	ULONG64 cmd;
	PVOID inData;
	ULONG64 inSize;
	ULONG64 retStatus;
}CommPackage, * PCommPackage;


typedef struct _ModuleInfo {
	ULONG64 pid;
	ULONG64 moduleName;
	ULONG64 moduleBase;
	ULONG64 moduleSize;
}ModuleInfo, * PModuleInfo;

typedef struct _READWRITEINFO {
	ULONG64 pid;
	ULONG64 targetAddress;
	ULONG64 buffer;
	ULONG64 size;
}READWRITEINFO, * PREADWRITEINFO;

typedef struct _QUERYINFO {
	ULONG64 pid;
	ULONG64 targetAddress;
	ULONG64 memoryInfo;
}QUERYINFO, * PQUERYINFO;

typedef struct _PROTECTEDPROCESSINFO {
	ULONG64 pid;
}PROTECTEDPROCESSINFO, * PPROTECTEDPROCESSINFO;
typedef struct _REMOTECALLINFO {
	ULONG64 pid;
	ULONG64 shellCode;
	ULONG64 shellCodeSize;
}REMOTECALLINFO,*PREMOTECALLINFO;

typedef enum _CMD {
	CMD_TEST,//��ֹ��������֮�� �ظ����� 
	CMD_GET_MOUDULE,
	CMD_READ_MEMORY,
	CMD_WRITE_MEMORY,
	CMD_QUERY_MEMORY,
	CMD_PROCESS_PROCESS,
	CMD_REMOTE_CALL
};




BOOLEAN DriverComm(ULONG cmd, PVOID inData, SIZE_T size);

ULONG64 DriverGetModuleInfo(HANDLE pid, char* moduleName);

BOOLEAN DriverReadProcessMemory(HANDLE pid, PVOID address, PVOID buffer, SIZE_T size);

BOOLEAN DriverWriteProcessMemory(HANDLE pid, PVOID address, PVOID buffer, SIZE_T size);

BOOLEAN DriverQueryProcessMemory(HANDLE pid, PVOID address, PMEMORY_BASIC_INFORMATION memoryInfo);

BOOLEAN DriverProtectProcess(HANDLE pid);

BOOLEAN DriverRemoteCall(HANDLE pid, PVOID shellCode, SIZE_T shellCodeSize);